<template>
  <div>
    <van-nav-bar
      :z-index="999"
      :fixed="true"
      left-arrow
      @click-left="onClickLeft"
      :placeholder="true"
      title="全部评论"
    ></van-nav-bar>
    <div v-for="(item, index) in comments" :key="index" class="in-panel-bd">
      <van-cell class="nBss-cell">
        <template #icon>
          <div class="nb-avatar">
            <img :src="item.img" alt />
          </div>
        </template>
        <template>
          <div class="info">
            <div class="author">{{item.name}}</div>
            <div class="comment-attr">
              <div class="postTime">{{item.time}}</div>
              <div class="raty-box">
                <van-icon name="star" />
                <van-icon name="star" />
                <van-icon name="star" />
                <van-icon name="star" />
                <van-icon name="starss" />
                <span>{{item.number}}</span>
              </div>
            </div>
          </div>
          <div class="content">
            <div class="text">
              <span>{{item.content}}</span>
            </div>
            <div class="bottom-icon">
              <div class="icon">
                <van-icon name="eye-o" />
                {{item.preview}}
              </div>
              <div class="icon">
                <van-icon name="like-o" />
                {{item.collect}}
              </div>
            </div>
          </div>
        </template>
      </van-cell>
    </div>
  </div>
</template>

<script>
export default {
  name: "LadderPlayer",
  data() {
    return {
      comments: [
        {
          img: require("../../assets/avatar2.png"),
          name: "匿名评论",
          time: "2020/05/29",
          number: "5",
          content: "今天上午科目四顺利通过，坐等下午拿证，感谢驾校一点通。",
          preview: "10",
          collect: "20"
        },
        {
          img: require("../../assets/avatar2.png"),
          name: "王晓",
          time: "2020/05/02",
          number: "5",
          content: "今天上午科目三顺利通过，坐等靠科四，感谢驾校一点通。",
          preview: "40",
          collect: "0"
        }
      ]
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    }
  },
    created(){
    let dsBridge = require("dsbridge");
         dsBridge.call("goBack","", function() {
           history.go(-1);
         });
   },
};
</script>

<style>
</style>